import { Graphics, Point } from "pixi.js";
import { BoneController } from "../../controllers/BoneController";
import { ItransformableItem } from "../../controllers/ITransformableItem";

export class Rotate extends Graphics {
    public triangle: Graphics;
    public target: ItransformableItem | null = null;

    constructor() {
        super();
        this.lineStyle(5, "red", 1);
        this.beginFill(0xffffff, 0.01);
        this.drawCircle(0, 0, 40);
        this.endFill();

        // // //Fill shape's color
        this.endFill();
        this.tint = "red"
        this.zIndex = 2;

        let triangle = new Graphics();
        triangle.lineStyle(2, "red", 1);
        triangle.moveTo(50, 0);

        triangle.beginFill("red");
        triangle.drawPolygon([
            new Point(45, 10),             //First point
            new Point(55, 0),              //Second point
            new Point(45, -10),           //Third point
        ]);

        // // //Fill shape's color
        triangle.endFill();
        this.tint = "red"

        this.addChild(triangle);
        this.triangle = triangle;
    }
}
